﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharp10.CSharpAdvanced
{
    /// <summary>
    /// 重载操作符号
    /// </summary>
    internal class OperatorFunctions
    {
        public static void Show()
        {
            Note B = new Note(2);
            Note c = B + 2;
            Console.WriteLine();
        }
    }
    /**
     <summary>dsaf</summary>
     */
    public struct Note
    {
        int value;
        public Note(int semitonesFromA) { value = semitonesFromA; }
        public static Note operator +(Note a, int b)
        {
            return new Note(a.value + b);
        }
    }
}
